<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <input type="text" />
  <ul></ul>
  <script>
    let oInput = document.querySelector("input");
    let oUl = document.querySelector("ul");
    oInput.oninput = function () {
      let val = oInput.value;
      let oScript = document.createElement("script");
      oScript.src = `https://suggest.taobao.com/sug?code=utf-8&q=${val}&_ksTS=1591257683085_275&callback=jsonp&k=1&area=c2c&bucke tid=18`;
      document.body.appendChild(oScript);
    };
    function jsonp(data) {
      let result = data.result;
      let str = "";
      result.forEach((item) => {
        str += `<li>${item[0]}</li>`;
      });
      oUl.innerHTML = str;
    }
  </script>
</body>

</html>